package com.situ.day6;

import java.lang.String;

public class Person extends Object{
    // 私有的属性和方法只能在当前类访问，子类也不能访问
    // 对于父类里面想让子类继承的，一般设置为protected
    protected int id;
    protected String name;
    protected int age;
    protected String gender;

    public Person() {
        System.out.println("Person.Person1");
    }

    public Person(int id, String name, int age, String gender) {
        System.out.println("Person.Person2");
        this.id = id;
        this.name = name;
        this.age = age;
        this.gender = gender;
    }

    public void show() {
        System.out.println("id是"+id+"的"+name+"，性别"+gender+"，年龄是"+age);
    }

}
